from google.appengine.ext import db

class company(db.Model):
	id = db.IntegerProperty(required=True)
	name = db.StringProperty(required=True)

class mops_data_available(db.Model):
	year = db.IntegerProperty(required=True)
	season = db.IntegerProperty(required=True)
	income_statement_get = db.BooleanProperty(required=True)
	balance_sheet_get = db.BooleanProperty(required=True)

class income_statement_normal(db.Model):
	year = db.IntegerProperty(required=True)
	season = db.IntegerProperty(required=True)
	company_ref = db.ReferenceProperty(company)
	operating_revenue = db.IntegerProperty()
	operating_cost = db.IntegerProperty()
	gross_profit = db.IntegerProperty()
	unrealized_gain_on_inter_affiliate_accounts = db.IntegerProperty()
	realized_gain_on_inter_affiliate_accounts = db.IntegerProperty()
	operating_expenses = db.IntegerProperty()
	net_operating_income = db.IntegerProperty()
	non_operating_revenue = db.IntegerProperty()
	non_operating_cost = db.IntegerProperty()
	continuing_operating_income_before_tax = db.IntegerProperty()
	income_tax_expense = db.IntegerProperty()
	continuing_operating_income = db.IntegerProperty()
	discontinued_operating_income = db.IntegerProperty()
	extraordinatry_items = db.IntegerProperty()
	cumulative_effect_of_changes_in_accounting_principles = db.IntegerProperty()
	net_income = db.IntegerProperty()
	eps = db.FloatProperty()

class balance_sheet_normal(db.Model):
	company_ref = db.ReferenceProperty(company)
	current_assets = db.IntegerProperty(required=True)

# StringProperty
# IntegerProperty
# FloatProperty
# BooleanProperty
# ReferenceProperty
# GeoPtProperty
# UserProperty
